/*
 * Copyright (C) 2021 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package com.zhpan.bannerview.view;

import ohos.agp.components.AttrSet;
import ohos.agp.components.PageSlider;
import ohos.app.Context;

/**
 * BannerViewPagerHorizontal
 *
 * @since 2021-03-24
 */
public class BannerViewPagerHorizontal extends PageSlider {
    private static final int THREE = 3;
    private boolean isScrollable = true;

    /**
     * BannerViewPagerHorizontal
     *
     * @param context 参数
     */
    public BannerViewPagerHorizontal(Context context) {
        super(context);
        setOrientation(VERTICAL);
        this.setClipEnabled(false);
        this.setPageCacheSize(THREE);
    }

    /**
     * BannerViewPagerHorizontal
     *
     * @param context 参数
     * @param attrs 参数
     */
    public BannerViewPagerHorizontal(Context context, AttrSet attrs) {
        super(context, attrs);
        setOrientation(VERTICAL);
        this.setClipEnabled(false);
        this.setPageCacheSize(THREE);
    }

    /**
     * BannerViewPagerHorizontal
     *
     * @param context 参数
     * @param attrSet 参数
     * @param styleName 参数
     */
    public BannerViewPagerHorizontal(Context context, AttrSet attrSet, String styleName) {
        super(context, attrSet, styleName);
        setOrientation(VERTICAL);
    }

    /**
     * setScrollable
     *
     * @param isScrollable1 参数
     */
    public void setScrollable(boolean isScrollable1) {
        this.isScrollable = isScrollable1;
        this.setSlidingPossible(isScrollable1);
    }
}
